Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to API 8.0 #314

Merged
merged 15 commits into from
Nov 24, 2024
Merged

Upgrade to API 8.0 #314

merged 15 commits into from
Nov 24, 2024

Conversation

seorgiy
Copy link
Contributor

@seorgiy seorgiy commented Oct 11, 2024

Also i tried to parse json schema from https://ark0f.github.io/tg-bot-api/openapi.json and build some parser (new rake tasks). It's not ideal in the many ways but it's something

@atipugin
Copy link
Owner

Hey @seorgiy

Looks really nice, much better than parsing their docs. I'll take a deeper look this weekend. Also we need to make linter pass (not sure why it fails)

@seorgiy
Copy link
Contributor Author

seorgiy commented Nov 12, 2024

Hey, @atipugin, gentle reminder 🙄

@atipugin
Copy link
Owner

Hey @seorgiy

Sorry for the delay, could you update this PR also up to 7.11?

@seorgiy seorgiy changed the title Upgrade to API 7.10 Upgrade to API 7.11 Nov 16, 2024
@seorgiy
Copy link
Contributor Author

seorgiy commented Nov 16, 2024

Done

@atipugin
Copy link
Owner

atipugin commented Nov 16, 2024

Yeah, thanks!

But we still need to figure out what to do with specs. We use type_attributes.yml in types_spec.rb to ensure our Ruby classes have all required attributes. I don't really want to keep both openai_type_attributes.json and type_attributes.yml. I think we need to rewrite tests to use JSON file instead.

I'm also not sure that spec/support is the correct place for openapi_type_attributes.json and type.rb, because these files are used to generate stuff, not just for specs. I'd move JSON file to top-level data dir or something. I'd also split rake tasks and move it rakelib. But we could do it later, outside this PR. The first thing is to make specs work with JSON file

What do you think, @seorgiy?

@seorgiy
Copy link
Contributor Author

seorgiy commented Nov 17, 2024

@atipugin hey! I have improved the typebuilder, now it is fully automatic, except for the methods added to the classes. Introduced min/max constraints.

Unfortunately, I am very bad at writing tests. But now it turns out that we are testing the generated classes against the generated schema. Looks not really useful to me. Still i made simple fresh file at least for basic attributes compare.

Also tweaked structure a little, removed old parser, tasks moved to rakelib, take a look.

(too tired to fight linter right now 😪 )

@seorgiy
Copy link
Contributor Author

seorgiy commented Nov 18, 2024

@atipugin ok, not it's more or less readable. PR is looks kinda messy right now which im sorry for but it's working fine

@seorgiy seorgiy changed the title Upgrade to API 7.11 Upgrade to API 8.0 Nov 24, 2024
@atipugin
Copy link
Owner

@seorgiy GJ, man! Thanks for updating up to 8.0. Minor request - please set version to 2.1, because otherwise we have to make corresponding releases (2.1, 2.2, 2.3) based on your changelog. Let's just stick with 2.1 here

@seorgiy
Copy link
Contributor Author

seorgiy commented Nov 24, 2024

@atipugin done

@atipugin atipugin merged commit 8f91821 into atipugin:master Nov 24, 2024
4 checks passed
@atipugin
Copy link
Owner

Thanks! Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants